﻿using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using NBlog.Web.Application.Infrastructure;
using NBlog.Web.Application.Service.Entity;

namespace NBlog.Web.Controllers
{
    public partial class HomeController
    {
        public class IndexModel : LayoutModel
        {
            public List<EntrySummaryModel> Entries { get; set; }
        }

        public class PrivacyModel : LayoutModel
        {
        }

        public class AboutModel : LayoutModel
        {
        }

        public class AdvertiseModel : LayoutModel
        {
        }

        public class ContactModel : LayoutModel
        {
            [DisplayName("Your Name")]
            [Required(ErrorMessage = "Please enter your name.")]
            public string Name { get; set; }

            [DisplayName("Email")]
            [Required(ErrorMessage = "Please enter your email.")]
            public string Email { get; set; }
            
            [DisplayName("Message")]
            [Required(ErrorMessage = "Please enter your message.")]
            public string Message { get; set; }
        }

        public class EntrySummaryModel
        {
            public string Key { get; set; }
            public string Title { get; set; }
            public string Date{ get; set; }
            public string PrettyDate { get; set; }
        }

        public class ReviewsModel : LayoutModel
        {
            public Dictionary<BrandEntity, List<ReviewEntity>> GrouppedReviews { get; set; }
        }
    }
}